﻿<MudTable T="int" Items="_items" MultiSelection="true" SelectedItemsChanged="SelectedItemsChanged">
    <HeaderContent>
        <MudTh>#</MudTh>
    </HeaderContent>
    <RowTemplate>
        <MudTd>@context</MudTd>
        </RowTemplate>
</MudTable>
<MudText id="counter">@_counter</MudText>

@code {
    public static string __description__ = "Selecting the 'Select All' checkbox should trigger the 'SelectedItemsChanged' event only once";

    private int _counter = 0;
    private readonly int[] _items = [0, 1];

    private void SelectedItemsChanged(HashSet<int> selectedItems)
    {
        _counter++;
    }
}
